package com.example.sunxiao.smartd_aassistant;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.sunxiao.smartd_aassistant.start_page.LoginActivity;
import com.example.sunxiao.smartd_aassistant.start_page.RegisterActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{
private Button btn_login,btn_register;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getSupportActionBar().hide();
        setContentView(R.layout.activity_main);
        initView();
    }

    /**
     * 智点第二次测试
     * 初始化控件
     */
    private void initView() {
         btn_login = (Button)findViewById(R.id.btn_login);
        btn_register = (Button)findViewById(R.id.btn_register);

        btn_login.setOnClickListener(this);
        btn_register.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_login:
                LoginActivity.startLoginActivity(this);
            break;
            case R.id.btn_register:
                RegisterActivity.startRegisterActivity(this);
            break;
        }

    }
}
